/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package b_and_b_properties;

import b_and_b_properties.data.*;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.TextArea;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

/**
 *
 * @author 09265512
 */
public class Tabbed extends JFrame {

    private JTabbedPane realEstate = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
    protected DAO dao;
    protected Property property;
    protected Unit unit;
    protected Room room;
    protected int currentUnitIndex = -1;
    protected Unit[] unitArray;
    protected Room[][] roomArray;
    private PropertyEntryPanel pe;
    private PropertyDetailPanel pdp;
    private boolean isOldProperty = false;
    protected boolean saveNeeded = false;

    public Tabbed(DAO dao, Property property) {
        this.dao = dao;
        this.property = property;
        this.pe = new PropertyEntryPanel();
        this.pdp = new PropertyDetailPanel();
//        this.pe.setPDP(this.pdp);
//        this.pdp.setPEP(pe);
        add(realEstate);
        JScrollPane spPE = new JScrollPane(pe);
        realEstate.add(spPE, "Property Entry");
        realEstate.add(pdp, "Property Details");
        this.setTitle("Real Estate Program");
        this.setPreferredSize(new Dimension(1095, 758));
        this.setVisible(true);
        this.pack();
        realEstate.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                System.out.println("stateChanged");
                pe.savePropertyData();
//                pdp.saveFunction();
//                pe.getPDPProperty();
//                pdp.setUnit(pe.getUnitSelected(), isOldProperty);

            }
        });
    }

    protected class PropertyDetailPanel extends JPanel implements ItemListener, ListSelectionListener {

        /**
         *
         * @param daoObject
         * @param prop
         */
        public PropertyDetailPanel() {
            pfp = new PropertyFeaturesPanel(dao, property);
            initComponents();
            listScroller.setPreferredSize(new Dimension(110, 330));
            ListSelectionModel listSelectionModel = roomListHolder.getSelectionModel();
            listSelectionModel.addListSelectionListener(this);
            createTopLeft();
            createTenantOwnerPanel();
            createHouseInfoPanel();
            createRoomPanel();
            createTopRight();
            createRoomInfoPanel();
            createBottomLeft();
            createBottomRight();
            createEntryRoom();
            createDiningRoom();
            createLivingRoom();
            createMasterBedroom();
            createStudy();
            createKitchen();
            createFamilyRoom();
            setLayout(new GridLayout(2, 4, 10, 10));
            add(topLeft);
            add(topRight);
            add(bottomLeft);
            add(bottomRight);
            bdrmComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            bathComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            lotSizeTextField.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    try {
                        int lot = Integer.parseInt(lotSizeTextField.getText());
                        property.setLotsize(lot);
                    } catch (Exception ex) {
                        JOptionPane.showMessageDialog(null, "Lot Size must be a number");
                    }
                    saveNeeded = true;
                }
            });
            listDateTextField.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    Date date = new Date(listDateTextField.getText());
                    unit.setListdate(date);
                    saveNeeded = true;
                }
            });
            ownerNameTextField.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    property.setOwner(ownerNameTextField.getText());
                    saveNeeded = true;
                }
            });
            numberOfRoomsTextField.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    unit.setNumberofrooms(Integer.parseInt(numberOfRoomsTextField.getText()));
                    saveNeeded = true;
                }
            });
            numberOfFireplacesTextField.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    unit.setNumberoffireplaces(Integer.parseInt(numberOfFireplacesTextField.getText()));
                    saveNeeded = true;
                }
            });
            garageSpacesComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            heatPaidComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;

                }
            });
            waterPaidComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            airConditionYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            diningRoomYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            disabilityAccessYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            familyRoomYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            firstFloorBathroomYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            firstFloorBdrmYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            separateFurnaceYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
            separateGasYesNoComboBox.addActionListener(new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    saveNeeded = true;
                }
            });
//            setUnit(1);
        }

        /**
         * Getting the unit from the property object by the index of the unit object
         * @param x int of the unit index
         * @param oldProp whether we need to call loadData
         */
        public void setUnit(int x, boolean oldRecord) {
            int oldIndex = currentUnitIndex;
            int newIndex = x;
            if (oldIndex > -1) {
                saveUnit();
                currentUnitIndex = x;
                if (!oldRecord) {
                    unit = property.getUnit(x);
                    clearUnitCheckBoxes();
                    clearUnitTextFields();
                } else {
                    unit = property.getUnit(x);
                    setCheckBoxes();
                    setOtherFields();
                }
            }
            unit = property.getUnit(x);
            setCheckBoxes();
            setOtherFields();
            currentUnitIndex = x;
        }

        private void clearUnitCheckBoxes() {
            heatPaidComboBox.setSelectedIndex(0);
            waterPaidComboBox.setSelectedIndex(0);
            separateFurnaceYesNoComboBox.setSelectedIndex(0);
            airConditionYesNoComboBox.setSelectedIndex(0);
            separateGasYesNoComboBox.setSelectedIndex(0);
            disabilityAccessYesNoComboBox.setSelectedIndex(0);
            firstFloorBdrmYesNoComboBox.setSelectedIndex(0);
            firstFloorBathroomYesNoComboBox.setSelectedIndex(0);
            familyRoomYesNoComboBox.setSelectedIndex(0);
            diningRoomYesNoComboBox.setSelectedIndex(0);
            garageSpacesComboBox.setSelectedIndex(0);
        }

        private void clearUnitTextFields() {
            bdrmComboBox.setSelectedIndex(0);
            bathComboBox.setSelectedIndex(0);
            listDateTextField.setText(null);
            numberOfRoomsTextField.setText(null);
            numberOfFireplacesTextField.setText(null);
            garageSpacesComboBox.setSelectedIndex(0);
//            tenantNameTextField.setText(null);
        }

        /**
         * Creates the top left panel of the Layout
         *
         */
        private void createTopLeft() {
            topLeft.setLayout(new GridLayout(6, 2));
            topLeft.add(bdrmLabel);
            bdrmComboBox.setSelectedIndex(0);
            topLeft.add(bdrmComboBox);
            topLeft.add(bathLabel);
            topLeft.add(bathComboBox);
            topLeft.add(lotSizeLabel);
            topLeft.add(lotSizeTextField);
            topLeft.add(yearBuiltLabel);
            topLeft.add(yearBuiltTextField);
            topLeft.add(listDateLabel);
            topLeft.add(listDateTextField);
            topLeft.add(ownerNameLabel);
            topLeft.add(ownerNameTextField);
        }

        /**
         * Creates the Top Right Panel for the frame
         */
        private void createTopRight() {
            topRight.setLayout(new BorderLayout(2, 2));
            topRight.add(houseInfoPanel, BorderLayout.NORTH);
            topRight.add(tenantOwnerPanel, BorderLayout.WEST);
            topRight.add(roomInfoPanel, BorderLayout.EAST);
        }

        /** 
         * Displays the Bottom Right Panel showing the 
         * check boxes for the possible rooms
         */
        private void createBottomRight() {
            bottomRight.setLayout(new BorderLayout());
            bottomRight.add(roomPanel, BorderLayout.CENTER);
        }

        /**
         * Creates the room panel for the bottom right panel.
         */
        private void createRoomPanel() {
            roomPanel.setLayout(new BorderLayout(100, 10));
            roomPanel.add(new JLabel("Avaiable Rooms", SwingConstants.CENTER), BorderLayout.NORTH);
            JPanel roomPanel2 = new JPanel(new GridLayout(3, 3));
            entryCheckBox.addItemListener(this);
            livingRoomCheckBox.addItemListener(this);
            diningRoomCheckBox.addItemListener(this);
            kitchenCheckBox.addItemListener(this);
            breakfastCheckBox.addItemListener(this);
            familyRoomCheckBox.addItemListener(this);
            studyCheckBox.addItemListener(this);
            recRoomCheckBox.addItemListener(this);
            laundryRoomCheckBox.addItemListener(this);
            roomPanel2.add(entryCheckBox);
            roomPanel2.add(livingRoomCheckBox);
            roomPanel2.add(diningRoomCheckBox);
            roomPanel2.add(kitchenCheckBox);
            roomPanel2.add(breakfastCheckBox);
            roomPanel2.add(familyRoomCheckBox);
            roomPanel2.add(studyCheckBox);
            roomPanel2.add(recRoomCheckBox);
            roomPanel2.add(laundryRoomCheckBox);
            roomPanel.add(roomPanel2, BorderLayout.CENTER);
            roomPanel.add(pfp, BorderLayout.SOUTH);
        }

        /**
         * Creates the top right panel showing Tenant/Owner Information
         * and information and other misc. info
         */
        private void createTenantOwnerPanel() {
            tenantOwnerPanel.setLayout(new GridLayout(5, 2, 2, 2));
            tenantOwnerPanel.add(heatPaidLabel);
            tenantOwnerPanel.add(heatPaidComboBox);
            tenantOwnerPanel.add(waterPaidLabel);
            tenantOwnerPanel.add(waterPaidComboBox);
            tenantOwnerPanel.add(sepGasElectricLabel);
            tenantOwnerPanel.add(separateGasYesNoComboBox);
            tenantOwnerPanel.add(sepFurnaceLabel);
            tenantOwnerPanel.add(separateFurnaceYesNoComboBox);
            tenantOwnerPanel.add(airConSeparateLabel);
            tenantOwnerPanel.add(airConditionYesNoComboBox);
        }

        /**
         * Adds the list panel to the bottom left panel of the frame
         */
        private void createBottomLeft() {
            bottomLeft.setLayout(new BorderLayout());
            roomListHolder.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            bottomLeft.add(listScroller, BorderLayout.WEST);
        }

        /**
         * Creates the room info panel for misc. information regarding the unit 
         */
        private void createRoomInfoPanel() {
            roomInfoPanel.setLayout(new GridLayout(5, 2, 2, 2));
            roomInfoPanel.add(disabilityAccessLabel);
            roomInfoPanel.add(disabilityAccessYesNoComboBox);
            roomInfoPanel.add(new JLabel("First Floor Bedroom"));
            roomInfoPanel.add(firstFloorBdrmYesNoComboBox);
            roomInfoPanel.add(new JLabel("First Floor Bathroom"));
            roomInfoPanel.add(firstFloorBathroomYesNoComboBox);
            roomInfoPanel.add(new JLabel("Family Room"));
            roomInfoPanel.add(familyRoomYesNoComboBox);
            roomInfoPanel.add(new JLabel("Formal Dining Room"));
            roomInfoPanel.add(diningRoomYesNoComboBox);
        }

        /**
         * Creates the house panel which allows input of basic information for 
         * the house. 
         */
        private void createHouseInfoPanel() {
            houseInfoPanel.setLayout(new GridLayout(3, 2));
            houseInfoPanel.add(numberOfRoomsLabel);
            houseInfoPanel.add(numberOfRoomsTextField);
            houseInfoPanel.add(numberOfFireplacesLabel);
            houseInfoPanel.add(numberOfFireplacesTextField);
            houseInfoPanel.add(garageSpacesLabel);
            houseInfoPanel.add(garageSpacesComboBox);
        }

        /**
         * Master Bedroom Panel which displays in the bottom left when 
         * the Master Bedroom item is selected from the JList
         */
        private void createMasterBedroom() {
            dimOfMasterBedroom.add(masterBedroomWidth);
            dimOfMasterBedroom.add(new JLabel("x", SwingConstants.CENTER));
            dimOfMasterBedroom.add(masterBedroomLength);
            masterBedroomListPanel.setLayout(new BorderLayout(2, 2));
            JPanel masterBedroomCheckPanel = new JPanel(new GridLayout(13, 2));
            masterBedroomCheckPanel.add(woodFloorMasterBedroomCkBox);
            masterBedroomCheckPanel.add(wwCarpetMasterBedroomCkBox);
            masterBedroomCheckPanel.add(bathAdjoinsMasterBedroomCkBox);
            masterBedroomCheckPanel.add(firePlaceMasterBedroomCkBox);
            masterBedroomCheckPanel.add(walkoutMasterBedroomCkBox);
            masterBedroomCheckPanel.add(windowTreatMasterBedroomCkBox);
            masterBedroomCheckPanel.add(sittingRoomMasterBedroomCkBox);
            masterBedroomCheckPanel.add(skyLightMasterBedroomCkBox);
            masterBedroomCheckPanel.add(closetMasterBedroomCkBox);
            masterBedroomCheckPanel.add(dressAreaMasterBedroomCkBox);
            masterBedroomCheckPanel.add(commentMasterBedroomLabel);
            masterBedroomCheckPanel.add(vaultedCeilingMasterBedroomCkBox);
            masterBedroomCheckPanel.add(masterBedroomCommentTextArea);
            masterBedroomCheckPanel.add(new JLabel());
            masterBedroomCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            masterBedroomCheckPanel.add(dimOfMasterBedroom);
            masterBedroomListPanel.add(new JLabel("Master Bedroom", SwingConstants.CENTER), BorderLayout.NORTH);
            masterBedroomListPanel.add(masterBedroomCheckPanel, BorderLayout.CENTER);
            woodFloorMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            skyLightMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (skyLightMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            sittingRoomMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (sittingRoomMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            wwCarpetMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wwCarpetMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            closetMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (closetMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            bathAdjoinsMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (bathAdjoinsMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            walkoutMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (walkoutMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            windowTreatMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            vaultedCeilingMasterBedroomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (vaultedCeilingMasterBedroomCkBox.isSelected()) {
                        masterBedroomCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        masterBedroomCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
        }

        /**
         * Creates the panel for the Family Room when it is selected from
         * the JList
         */
        private void createFamilyRoom() {
            familyRoomListPanel.setLayout(new BorderLayout(2, 2));
            JPanel familyRoomCheckPanel = new JPanel(new GridLayout(13, 2));
            familyRoomCheckPanel.add(woodFloorFamilyRoomCkBox);
            familyRoomCheckPanel.add(laminateFloorFamilyRoomCkBox);
            familyRoomCheckPanel.add(wwCarpetFamilyRoomCkBox);
            familyRoomCheckPanel.add(firePlaceFamilyRoomCkBox);
            familyRoomCheckPanel.add(walkoutFamilyRoomCkBox);
            familyRoomCheckPanel.add(windowTreatFamilyRoomCkBox);
            familyRoomCheckPanel.add(bookcaseFamilyRoomCkBox);
            familyRoomCheckPanel.add(frenchDoorsFamilyRoomCkBox);
            familyRoomCheckPanel.add(panelWallsFamilyRoomCkBox);
            familyRoomCheckPanel.add(dryBarFamilyRoomCkBox);
            familyRoomCheckPanel.add(commentFamilyRoomLabel);
            familyRoomCheckPanel.add(skylightFamilyRoomCkBox);
            familyRoomCheckPanel.add(familyRoomCommentTextArea);
            familyRoomCheckPanel.add(new JLabel());
            familyRoomCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            familyRoomCheckPanel.add(dimOfFamilyRoom);
            familyRoomListPanel.add(new JLabel("Family Room", SwingConstants.CENTER), BorderLayout.NORTH);
            familyRoomListPanel.add(familyRoomCheckPanel, BorderLayout.CENTER);
            woodFloorFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            skylightFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (skylightFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            panelWallsFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (panelWallsFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            wwCarpetFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wwCarpetFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            laminateFloorFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (laminateFloorFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            dryBarFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (dryBarFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            walkoutFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (walkoutFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            windowTreatFamilyRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatFamilyRoomCkBox.isSelected()) {
                        familyRoomCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        familyRoomCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
        }

        /**
         * Creates the dining room panel which displays in the bottom left
         * when the Dining Room value is selected from the JList
         */
        private void createDiningRoom() {
            dimOfDiningRoom.add(DiningRoomWidth);
            dimOfDiningRoom.add(new JLabel("x", SwingConstants.CENTER));
            dimOfDiningRoom.add(DiningRoomLength);
            diningRoomListPanel.setLayout(new BorderLayout(2, 2));
            JPanel diningRoomCheckPanel = new JPanel(new GridLayout(13, 2));
            diningRoomCheckPanel.add(woodFloorDiningRoomCkBox);
            diningRoomCheckPanel.add(laminateFloorDiningRoomCkBox);
            diningRoomCheckPanel.add(wwCarpetDiningRoomCkBox);
            diningRoomCheckPanel.add(firePlaceDiningRoomCkBox);
            diningRoomCheckPanel.add(walkoutDiningRoomCkBox);
            diningRoomCheckPanel.add(windowTreatDiningRoomCkBox);
            diningRoomCheckPanel.add(chairRailDiningRoomCkBox);
            diningRoomCheckPanel.add(frenchDoorsDiningRoomCkBox);
            diningRoomCheckPanel.add(chandelierDiningRoomCkBox);
            diningRoomCheckPanel.add(builtInsDiningRoomCkBox);
            diningRoomCheckPanel.add(commentDiningRoomLabel);
            diningRoomCheckPanel.add(new JLabel());
            diningRoomCheckPanel.add(diningRoomCommentTextArea);
            diningRoomCheckPanel.add(new JLabel());
            diningRoomCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            diningRoomCheckPanel.add(dimOfDiningRoom);
            diningRoomListPanel.add(new JLabel("Dining Room", SwingConstants.CENTER), BorderLayout.NORTH);
            diningRoomListPanel.add(diningRoomCheckPanel, BorderLayout.CENTER);
            woodFloorDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            chandelierDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (chandelierDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            chairRailDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (chairRailDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            wwCarpetDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wwCarpetDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            laminateFloorDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (laminateFloorDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            builtInsDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (builtInsDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            walkoutDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (walkoutDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            windowTreatDiningRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatDiningRoomCkBox.isSelected()) {
                        diningRoomCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        diningRoomCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
        }

        /**
         * Creates the Living room panel which displays in the bottom left
         * when the Living Room value is selected from the JList
         */
        private void createLivingRoom() {
            JPanel dimOfLivingRoom = new JPanel(new GridLayout(1, 3));
            dimOfLivingRoom.add(livingRoomWidth);
            dimOfLivingRoom.add(new JLabel("x", SwingConstants.CENTER));
            dimOfLivingRoom.add(livingRoomLength);
            livingRoomListPanel.setLayout(new BorderLayout(2, 2));
            JPanel livingRoomCheckPanel = new JPanel(new GridLayout(13, 2));
            livingRoomCheckPanel.add(woodFloorLivingRoomCkBox);
            livingRoomCheckPanel.add(laminateFloorLivingRoomCkBox);
            livingRoomCheckPanel.add(wwCarpetLivingRoomCkBox);
            livingRoomCheckPanel.add(firePlaceLivingRoomCkBox);
            livingRoomCheckPanel.add(walkoutLivingRoomCkBox);
            livingRoomCheckPanel.add(windowTreatLivingRoomCkBox);
            livingRoomCheckPanel.add(bookcaseLivingRoomCkBox);
            livingRoomCheckPanel.add(skylightLivingRoomCkBox);
            livingRoomCheckPanel.add(wetBarLivingRoomCkBox);
            livingRoomCheckPanel.add(dryBarLivingRoomCkBox);
            livingRoomCheckPanel.add(commentLivingRoomLabel);
            livingRoomCheckPanel.add(doubleDoorsLivingRoomCkBox);
            livingRoomCheckPanel.add(livingRoomCommentTextArea);
            livingRoomCheckPanel.add(new JLabel());
            livingRoomCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            livingRoomCheckPanel.add(dimOfLivingRoom);
            livingRoomListPanel.add(new JLabel("Living Room", SwingConstants.CENTER), BorderLayout.NORTH);
            livingRoomListPanel.add(livingRoomCheckPanel, BorderLayout.CENTER);
            woodFloorLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            wetBarLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wetBarLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            bookcaseLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (bookcaseLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            skylightLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (skylightLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            wwCarpetLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wwCarpetLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            firePlaceLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            laminateFloorLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (laminateFloorLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            dryBarLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (dryBarLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            walkoutLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    if (walkoutLivingRoomCkBox.isSelected()) {
                        saveNeeded = true;
                        livingRoomCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
            windowTreatLivingRoomCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatLivingRoomCkBox.isSelected()) {
                        livingRoomCBConverter.set(CheckBoxConverter.BOX10);
                    } else {
                        livingRoomCBConverter.clear(CheckBoxConverter.BOX10);
                    }
                }
            });
        }

        /**
         * Creates the Study panel which displays in the bottom left
         * when the Study value is selected from the JList
         */
        private void createStudy() {
            dimOfStudy.add(studyWidth);
            dimOfStudy.add(new JLabel("x", SwingConstants.CENTER));
            dimOfStudy.add(studyLength);
            studyListPanel.setLayout(new BorderLayout(2, 2));
            JPanel studyCheckPanel = new JPanel(new GridLayout(12, 2));
            studyCheckPanel.add(woodFloorStudyCkBox);
            studyCheckPanel.add(laminateFloorStudyCkBox);
            studyCheckPanel.add(wwCarpetStudyCkBox);
            studyCheckPanel.add(firePlaceStudyCkBox);
            studyCheckPanel.add(walkoutStudyCkBox);
            studyCheckPanel.add(windowTreatStudyCkBox);
            studyCheckPanel.add(bookcaseStudyCkBox);
            studyCheckPanel.add(frenchDoorsStudyCkBox);
            studyCheckPanel.add(closetStudyCkBox);
            studyCheckPanel.add(commentStudyLabel);
            studyCheckPanel.add(new JLabel());
            studyCheckPanel.add(studyCommentTextArea);
            studyCheckPanel.add(new JLabel());
            studyCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            studyCheckPanel.add(dimOfStudy);
            studyListPanel.add(new JLabel("Study", SwingConstants.CENTER), BorderLayout.NORTH);
            studyListPanel.add(studyCheckPanel, BorderLayout.CENTER);
            woodFloorStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            bookcaseStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (bookcaseStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            closetStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (closetStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            wwCarpetStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (wwCarpetStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            laminateFloorStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (laminateFloorStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            frenchDoorsStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (frenchDoorsStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            walkoutStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (walkoutStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            windowTreatStudyCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatStudyCkBox.isSelected()) {
                        studyCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        studyCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
        }

        /**
         * Creates the Kitchen panel which displays in the bottom left
         * when the Kitchen value is selected from the JList
         */
        private void createKitchen() {
            dimOfKitchen.add(kitchenWidth);
            dimOfKitchen.add(new JLabel("x", SwingConstants.CENTER));
            dimOfKitchen.add(kitchenLength);
            kitchenListPanel.setLayout(new BorderLayout(2, 2));
            JPanel kitchenCheckPanel = new JPanel(new GridLayout(16, 2));
            kitchenCheckPanel.add(woodFloorKitchenCkBox);
            kitchenCheckPanel.add(laminateFloorKitchenCkBox);
            kitchenCheckPanel.add(vinylFloorKitchenCkBox);
            kitchenCheckPanel.add(firePlaceKitchenCkBox);
            kitchenCheckPanel.add(stoneCounterKitchenCkBox);
            kitchenCheckPanel.add(windowTreatKitchenCkBox);
            kitchenCheckPanel.add(ceramicTileKitchenCkBox);
            kitchenCheckPanel.add(eatInKitchenCkBox);
            kitchenCheckPanel.add(gourmetKitchenCkBox);
            kitchenCheckPanel.add(countryKitchenCkBox);
            kitchenCheckPanel.add(counterBarKitchenCkBox);
            kitchenCheckPanel.add(galleyKitchenCkBox);
            kitchenCheckPanel.add(woodCabinetsKitchenCkBox);
            kitchenCheckPanel.add(pantryKitchenCkBox);
            kitchenCheckPanel.add(islandKitchenCkBox);
            kitchenCheckPanel.add(commentKitchenLabel);
            kitchenCheckPanel.add(solidSurfaceKitchenCkBox);
            kitchenCheckPanel.add(KitchenCommentTextArea);
            kitchenCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            kitchenCheckPanel.add(dimOfKitchen);
            kitchenListPanel.add(new JLabel("Kitchen ", SwingConstants.CENTER), BorderLayout.NORTH);
            kitchenListPanel.add(kitchenCheckPanel, BorderLayout.CENTER);
            woodFloorKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodFloorKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            ceramicTileKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (ceramicTileKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            counterBarKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (counterBarKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            countryKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (countryKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (firePlaceKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            eatInKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (eatInKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            galleyKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (galleyKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            laminateFloorKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (laminateFloorKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            vinylFloorKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (vinylFloorKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
            islandKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (islandKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX10);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX10);
                    }
                }
            });
            solidSurfaceKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (solidSurfaceKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX11);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX11);
                    }
                }
            });
            stoneCounterKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (stoneCounterKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX12);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX12);
                    }
                }
            });
            woodCabinetsKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (woodCabinetsKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX13);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX13);
                    }
                }
            });
            windowTreatKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (windowTreatKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX14);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX14);
                    }
                }
            });
            pantryKitchenCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    if (pantryKitchenCkBox.isSelected()) {
                        kitchenCBConverter.set(CheckBoxConverter.BOX15);
                    } else {
                        kitchenCBConverter.clear(CheckBoxConverter.BOX15);
                    }
                }
            });
        }

        /**
         * Creates the Entry panel which displays in the bottom left
         * when the Entry value is selected from the JList
         */
        private void createEntryRoom() {
            dimOfEntryRoom.add(entryRoomWidth);
            dimOfEntryRoom.add(new JLabel("x", SwingConstants.CENTER));
            dimOfEntryRoom.add(entryRoomLength);
            entryListPanel.setLayout(new BorderLayout(2, 2));
            JPanel entryCheckPanel = new JPanel(new GridLayout(13, 2));
            entryCheckPanel.add(woodFloorEntryCkBox);
            entryCheckPanel.add(laminateFloorEntryCkBox);
            entryCheckPanel.add(vinylFloorEntryCkBox);
            entryCheckPanel.add(firePlaceEntryCkBox);
            entryCheckPanel.add(walkoutEntryCkBox);
            entryCheckPanel.add(windowTreatEntryCkBox);
            entryCheckPanel.add(bookcaseEntryCkBox);
            entryCheckPanel.add(frenchDoorsEntryCkBox);
            entryCheckPanel.add(closetEntryCkBox);
            entryCheckPanel.add(foyerEntryCkBox);
            entryCheckPanel.add(commentEntryLabel);
            entryCheckPanel.add(doubleDoorsEntryCkBox);
            entryCheckPanel.add(entryCommentTextArea);
            entryCheckPanel.add(new JLabel());
            entryCheckPanel.add(new JLabel("Room Dimensions:", SwingConstants.CENTER));
            entryCheckPanel.add(dimOfEntryRoom);
            entryListPanel.add(new JLabel("Entry Room", SwingConstants.CENTER), BorderLayout.NORTH);
            entryListPanel.add(entryCheckPanel, BorderLayout.EAST);
            woodFloorEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (woodFloorEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX1);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX1);
                    }
                }
            });
            bookcaseEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (bookcaseEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX2);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX2);
                    }
                }
            });
            closetEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (closetEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX3);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX3);
                    }
                }
            });
            doubleDoorsEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (doubleDoorsEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX4);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX4);
                    }
                }
            });
            firePlaceEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (firePlaceEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX5);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX5);
                    }
                }
            });
            foyerEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (foyerEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX6);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX6);
                    }
                }
            });
            frenchDoorsEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (frenchDoorsEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX7);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX7);
                    }
                }
            });
            laminateFloorEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (laminateFloorEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX8);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX8);
                    }
                }
            });
            vinylFloorEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (vinylFloorEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX9);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX9);
                    }
                }
            });
            walkoutEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (walkoutEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX10);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX10);
                    }
                }
            });
            windowTreatEntryCkBox.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    saveNeeded = true;
                    saveNeeded = true;
                    if (windowTreatEntryCkBox.isSelected()) {
                        entryRoomCBConverter.set(CheckBoxConverter.BOX11);
                    } else {
                        entryRoomCBConverter.clear(CheckBoxConverter.BOX11);
                    }
                }
            });
        }

        /**
         * Add all the valueChanged listeners for all the objects
         * @param e
         */
        public void valueChanged(ListSelectionEvent e) {
            try {
                if (roomListHolder.getSelectedValue().equals("Entry Room") && entryCheckBox.isSelected()) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(entryListPanel, BorderLayout.CENTER);
                    this.revalidate();
                    this.repaint();
                } else if (roomListHolder.getSelectedValue().equals("Entry Room") && !entryCheckBox.isSelected()) {
                    roomListHolder.setSelectedIndex(0);
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Kitchen") && kitchenCheckBox.isSelected()) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(kitchenListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                } else if (roomListHolder.getSelectedValue().equals("Kitchen") && !kitchenCheckBox.isSelected()) {
                    roomListHolder.setSelectedIndex(0);
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Study") && studyCheckBox.isSelected()) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(studyListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                } else if (roomListHolder.getSelectedValue().equals("Study") && !studyCheckBox.isSelected()) {
                    roomListHolder.setSelectedIndex(0);
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Master Bedroom")) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(masterBedroomListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Living Room")) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(livingRoomListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Dining Room")) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(diningRoomListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                }
            } catch (Exception ex) {
            }
            try {
                if (roomListHolder.getSelectedValue().equals("Family Room")) {
                    bottomLeft.removeAll();
                    bottomLeft.add(listScroller, BorderLayout.WEST);
                    bottomLeft.add(familyRoomListPanel, BorderLayout.EAST);
                    this.revalidate();
                    this.repaint();
                }
            } catch (Exception ex) {
            }
        }

        /**
         * These are the listeners for the checkboxes and sets the listbox
         * for anything that is checked.
         * 
         * @param e the event passed
         */
        public void itemStateChanged(ItemEvent e) {
//            saveNeeded = true;
//            saveNeeded = true;
            if (entryCheckBox.isSelected() && !roomList.contains("Entry Room")) {
                roomList.addElement("Entry Room");
                roomCount++;
            }
            if (livingRoomCheckBox.isSelected() && !roomList.contains("Living Room")) {
                roomList.addElement("Living Room");
                roomCount++;
            }
            if (diningRoomCheckBox.isSelected() && !roomList.contains("Dining Room")) {
                roomList.addElement("Dining Room");
                roomCount++;
            }
            if (kitchenCheckBox.isSelected() && !roomList.contains("Kitchen")) {
                roomList.addElement("Kitchen");
                roomCount++;
            }
            if (familyRoomCheckBox.isSelected() && !roomList.contains("Family Room")) {
                roomList.addElement("Family Room");
                roomCount++;
            }
            if (studyCheckBox.isSelected() && !roomList.contains("Study")) {
                roomList.addElement("Study");
                roomCount++;
            }
            if (!entryCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(1);
                }
                roomList.removeElement("Entry Room");
                this.bottomLeft.remove(entryListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                roomListHolder.setEnabled(true);
            }
            if (!livingRoomCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(0);
                }
                roomList.removeElement("Living Room");
                this.bottomLeft.remove(livingRoomListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                roomListHolder.setEnabled(true);
            }
            if (!diningRoomCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(1);
                }
                roomList.removeElement("Dining Room");
                this.bottomLeft.remove(diningRoomListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                roomListHolder.setEnabled(true);
            }
            if (!kitchenCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(1);
                }
                roomList.removeElement("Kitchen");
                this.bottomLeft.remove(kitchenListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                bottomLeft.revalidate();
                roomListHolder.setEnabled(true);
            }
            if (!familyRoomCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(1);
                }
                roomList.removeElement("Family Room");
                this.bottomLeft.remove(familyRoomListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                roomListHolder.setEnabled(true);
            }
            if (!studyCheckBox.isSelected()) {
                roomCount--;
                if (roomList.getSize() == 1) {
                    roomListHolder.setEnabled(false);
                } else {
                    roomListHolder.setSelectedIndex(0);
                }
                roomList.removeElement("Study");
                this.bottomLeft.remove(studyListPanel);
                bottomLeft.add(listScroller, BorderLayout.WEST);
                this.bottomLeft.repaint();
                bottomLeft.revalidate();
                roomListHolder.setEnabled(true);
            }
            createBottomLeft();
            this.revalidate();
        }

        /**
         * Initializes all the components of the page
         */
        private void initComponents() {
//            currentUnit = -1;
//            saveNeeded = false;
            bdrmLabel = new JLabel("Bedrooms( # of)");
            bdrmComboBox = new JComboBox(bdrmChoices);
            bathLabel = new JLabel("Bathrooms( # of)");
            bathComboBox = new JComboBox(bathChoices);
            lotSizeLabel = new JLabel("Lot Size");
            yearBuiltLabel = new JLabel("Year Built");
            listDateLabel = new JLabel("List Date(##/##/##)");
            schoolDistrictLabel = new JLabel("School District");
            ownerNameLabel = new JLabel("Owner Name");
            numberOfRoomsLabel = new JLabel("Rooms( # of)");
            numberOfFireplacesLabel = new JLabel("Fireplaces(#of)");
            garageSpacesLabel = new JLabel("Garage Size");
            garageSpacesComboBox = new JComboBox(garageSpacesSelection);
            apartmentLevelLabel = new JLabel("Apartment Level");
            apartmentLevelComboBox = new JComboBox(apartmentLevelSelection);
            heatPaidLabel = new JLabel("Heat Paid By");
            heatPaidComboBox = new JComboBox(ownerTenantSelection);
            waterPaidLabel = new JLabel("Water Paid By");
            waterPaidComboBox = new JComboBox(ownerTenantSelection);
            airConditionYesNoComboBox = new JComboBox(yesNoSelection);
            separateFurnaceYesNoComboBox = new JComboBox(yesNoSelection);
            separateGasYesNoComboBox = new JComboBox(yesNoSelection);
            disabilityAccessYesNoComboBox = new JComboBox(yesNoSelection);
            airConSeparateLabel = new JLabel("Separate A/C");
            sepFurnaceLabel = new JLabel("Separate Furnace");
            sepGasElectricLabel = new JLabel("Separate Gas & Ele.");
            disabilityAccessLabel = new JLabel("Disability Access");
            firstFloorBdrmYesNoComboBox = new JComboBox(yesNoSelection);
            familyRoomYesNoComboBox = new JComboBox(yesNoSelection);
            firstFloorBathroomYesNoComboBox = new JComboBox(yesNoSelection);
            diningRoomYesNoComboBox = new JComboBox(yesNoSelection);
            entryCheckBox = new JCheckBox("Entry");
            livingRoomCheckBox = new JCheckBox("Living Room");
            diningRoomCheckBox = new JCheckBox("Dining Room");
            kitchenCheckBox = new JCheckBox("Kitchen");
            breakfastCheckBox = new JCheckBox("Breakfast Nook");
            familyRoomCheckBox = new JCheckBox("Family Room");
            studyCheckBox = new JCheckBox("Study");
            recRoomCheckBox = new JCheckBox("Recreation Room");
            laundryRoomCheckBox = new JCheckBox("Laundry Rroom");
            roomList = new DefaultListModel();
            roomListHolder = new JList(roomList);
            listScroller = new JScrollPane(roomListHolder);
            topLeft = new JPanel();
            topRight = new JPanel();
            bottomLeft = new JPanel();
            bottomRight = new JPanel();
            tenantOwnerPanel = new JPanel();
            houseInfoPanel = new JPanel();
            roomPanel = new JPanel();
            roomInfoPanel = new JPanel();
            entryListPanel = new JPanel();
            kitchenListPanel = new JPanel();
            studyListPanel = new JPanel();
            diningRoomListPanel = new JPanel();
            livingRoomListPanel = new JPanel();
            familyRoomListPanel = new JPanel();
            masterBedroomListPanel = new JPanel();
            woodFloorMasterBedroomCkBox = new JCheckBox("Wood Floors");
            wwCarpetMasterBedroomCkBox = new JCheckBox("WW Carpet");
            bathAdjoinsMasterBedroomCkBox = new JCheckBox("Bath Adjoins");
            firePlaceMasterBedroomCkBox = new JCheckBox("Fireplace");
            walkoutMasterBedroomCkBox = new JCheckBox("Walkout");
            windowTreatMasterBedroomCkBox = new JCheckBox("Window Treatments");
            sittingRoomMasterBedroomCkBox = new JCheckBox("Sitting Room");
            skyLightMasterBedroomCkBox = new JCheckBox("Skylight");
            closetMasterBedroomCkBox = new JCheckBox("Walk-In Closet");
            dressAreaMasterBedroomCkBox = new JCheckBox("Dress Area");
            vaultedCeilingMasterBedroomCkBox = new JCheckBox("Vaulted Ceiling");
            commentMasterBedroomLabel = new JLabel("Comments");
            dimOfMasterBedroom = new JPanel(new GridLayout(1, 3));
            woodFloorEntryCkBox = new JCheckBox("Wood Floors");
            laminateFloorEntryCkBox = new JCheckBox("Laminate Flooring");
            vinylFloorEntryCkBox = new JCheckBox("Vinyl Floors");
            firePlaceEntryCkBox = new JCheckBox("Fireplace");
            walkoutEntryCkBox = new JCheckBox("Walkout");
            windowTreatEntryCkBox = new JCheckBox("Window Treatments");
            bookcaseEntryCkBox = new JCheckBox("Bookcase");
            frenchDoorsEntryCkBox = new JCheckBox("French Doors");
            closetEntryCkBox = new JCheckBox("Closet");
            foyerEntryCkBox = new JCheckBox("Open Foyer");
            doubleDoorsEntryCkBox = new JCheckBox("Double Doors");
            commentEntryLabel = new JLabel("Comments");
            dimOfEntryRoom = new JPanel(new GridLayout(1, 3));
            woodFloorFamilyRoomCkBox = new JCheckBox("Wood Floors");
            laminateFloorFamilyRoomCkBox = new JCheckBox("Laminate Flooring");
            wwCarpetFamilyRoomCkBox = new JCheckBox("WW Carpet");
            firePlaceFamilyRoomCkBox = new JCheckBox("Fireplace");
            walkoutFamilyRoomCkBox = new JCheckBox("Walkout");
            windowTreatFamilyRoomCkBox = new JCheckBox("Window Treatments");
            bookcaseFamilyRoomCkBox = new JCheckBox("Bookcase");
            frenchDoorsFamilyRoomCkBox = new JCheckBox("French Doors");
            panelWallsFamilyRoomCkBox = new JCheckBox("Panel Walls");
            dryBarFamilyRoomCkBox = new JCheckBox("Dry Bar");
            skylightFamilyRoomCkBox = new JCheckBox("Skylight");
            commentFamilyRoomLabel = new JLabel("Comments");
            dimOfFamilyRoom = new JPanel(new GridLayout(1, 3));
            woodFloorDiningRoomCkBox = new JCheckBox("Wood Floors");
            laminateFloorDiningRoomCkBox = new JCheckBox("Laminate Flooring");
            wwCarpetDiningRoomCkBox = new JCheckBox("WW Carpet");
            firePlaceDiningRoomCkBox = new JCheckBox("Fireplace");
            walkoutDiningRoomCkBox = new JCheckBox("Walkout");
            windowTreatDiningRoomCkBox = new JCheckBox("Window Treatments");
            chairRailDiningRoomCkBox = new JCheckBox("Chair Rail");
            frenchDoorsDiningRoomCkBox = new JCheckBox("French Doors");
            chandelierDiningRoomCkBox = new JCheckBox("Chandelier");
            builtInsDiningRoomCkBox = new JCheckBox("Built-ins");
            commentDiningRoomLabel = new JLabel("Comments");
            dimOfDiningRoom = new JPanel(new GridLayout(1, 3));
            woodFloorLivingRoomCkBox = new JCheckBox("Wood Floors");
            laminateFloorLivingRoomCkBox = new JCheckBox("Laminate Flooring");
            wwCarpetLivingRoomCkBox = new JCheckBox("WW Carpet");
            firePlaceLivingRoomCkBox = new JCheckBox("Fireplace");
            walkoutLivingRoomCkBox = new JCheckBox("Walkout");
            windowTreatLivingRoomCkBox = new JCheckBox("Window Treatments");
            bookcaseLivingRoomCkBox = new JCheckBox("Bookcase");
            skylightLivingRoomCkBox = new JCheckBox("Skylight");
            wetBarLivingRoomCkBox = new JCheckBox("Wet Bar");
            dryBarLivingRoomCkBox = new JCheckBox("Dry Bar");
            doubleDoorsLivingRoomCkBox = new JCheckBox("Double Doors");
            commentLivingRoomLabel = new JLabel("Comments");
            woodFloorKitchenCkBox = new JCheckBox("Wood Floors");
            laminateFloorKitchenCkBox = new JCheckBox("Laminate Flooring");
            vinylFloorKitchenCkBox = new JCheckBox("Vinyl Floors");
            firePlaceKitchenCkBox = new JCheckBox("Fireplace");
            stoneCounterKitchenCkBox = new JCheckBox("Marb/Gran/Slate");
            windowTreatKitchenCkBox = new JCheckBox("Window Treatments");
            ceramicTileKitchenCkBox = new JCheckBox("Ceramic Tile");
            eatInKitchenCkBox = new JCheckBox("Eat In");
            gourmetKitchenCkBox = new JCheckBox("Gourmet");
            countryKitchenCkBox = new JCheckBox("Country");
            galleyKitchenCkBox = new JCheckBox("Galley");
            woodCabinetsKitchenCkBox = new JCheckBox("Wood Cabinets");
            pantryKitchenCkBox = new JCheckBox("Pantry");
            islandKitchenCkBox = new JCheckBox("Island");
            counterBarKitchenCkBox = new JCheckBox("Counter Bar");
            solidSurfaceKitchenCkBox = new JCheckBox("Solid Surface Counter");
            commentKitchenLabel = new JLabel("Comments");
            dimOfKitchen = new JPanel(new GridLayout(1, 3));
            woodFloorStudyCkBox = new JCheckBox("Wood Floors");
            laminateFloorStudyCkBox = new JCheckBox("Laminate Flooring");
            wwCarpetStudyCkBox = new JCheckBox("WW Carpet");
            firePlaceStudyCkBox = new JCheckBox("Fireplace");
            walkoutStudyCkBox = new JCheckBox("Walkout");
            windowTreatStudyCkBox = new JCheckBox("Window Treatments");
            bookcaseStudyCkBox = new JCheckBox("Bookcase");
            frenchDoorsStudyCkBox = new JCheckBox("French Doors");
            closetStudyCkBox = new JCheckBox("Closet");
            commentStudyLabel = new JLabel("Comments");
            dimOfStudy = new JPanel(new GridLayout(1, 3));
            lotDimensions1Label = new JTextField(4);
            lotDimensions2Label = new JTextField(4);
            masterBedroomCommentTextArea = new TextArea("Enter Comments", 3, 15);
            masterBedroomWidth = new JTextField(4);
            masterBedroomLength = new JTextField(4);
            entryCommentTextArea = new JTextArea("Enter Comments", 3, 15);
            entryRoomWidth = new JTextField(4);
            entryRoomLength = new JTextField(4);
            familyRoomCommentTextArea = new TextArea("Enter Comments", 3, 15);
            familyRoomWidth = new JTextField(4);
            familyRoomLength = new JTextField(4);
            diningRoomCommentTextArea = new TextArea("Enter Comments", 3, 15);
            DiningRoomWidth = new JTextField(4);
            DiningRoomLength = new JTextField(4);
            livingRoomCommentTextArea = new TextArea("Enter Comments", 3, 15);
            livingRoomWidth = new JTextField(4);
            livingRoomLength = new JTextField(4);
            KitchenCommentTextArea = new TextArea("Enter Comments", 3, 15);
            kitchenWidth = new JTextField(4);
            kitchenLength = new JTextField(4);
            studyCommentTextArea = new TextArea("Enter Comments", 3, 15);
            studyWidth = new JTextField(4);
            studyLength = new JTextField(4);
            lotSizeTextField = new JTextField(6);
            yearBuiltTextField = new JTextField(4);
            listDateTextField = new JFormattedTextField(new SimpleDateFormat("MM/dd/yy"));
            schoolDistrictTextField = new JTextField(10);
            ownerNameTextField = new JTextField(20);
            numberOfRoomsTextField = new JTextField(2);
            numberOfFireplacesTextField = new JTextField(1);


        }

        /**
         * Checks to see if the data in a text field is null, if it is
         * return 0
         */
        private String validateNonNull(String var) {
            return (var == null) ? "0" : var;
        }

        /**
         * Save Functionality
         */
        public void saveFunction() {
            saveProperty();
            saveUnit();
        }

        /**
         * saves all the information from the form to the property object
         */
        private void saveProperty() {//tttt
            System.out.println("saveProperty");
//            property = this.pep.getProperty();
//            pep.savePropertyData();
            property.setAmenities(pfp.getAmenitiesCBConverter());
            property.setBasement(pfp.getBasementCBConverter());
            property.setBuildings(pfp.getBuildingCBConverter());
            property.setDocs(pfp.getDocumentsCBConverter());
            property.setInside(pfp.getInsideFeatCBConverter());
            property.setOutside(pfp.getOutsideFeatCBConverter());
            property.setMisc(pfp.getMiscCBConverter());
            property.setZoning(Integer.toString(pfp.getZoningCBConverter()));
            property.setPview(pfp.getViewCBConverter());
//        saveUnit();
        }

        /**
         * Saves all the unit data from the form to the object
         */
        private void saveUnit() {
//        unit = this.property.getUnit(currentUnit);
//            unit = new Unit();
            unit.setHeatincluded(heatPaidComboBox.getSelectedIndex());
            unit.setWaterincluded(waterPaidComboBox.getSelectedIndex());
            unit.setSeparatefurnace(separateFurnaceYesNoComboBox.getSelectedIndex());
            unit.setSeparateac(airConditionYesNoComboBox.getSelectedIndex());
            unit.setSeparategaselectric(separateGasYesNoComboBox.getSelectedIndex());
            unit.setDisabilityaccess(disabilityAccessYesNoComboBox.getSelectedIndex());
            unit.setFirstfloorbdrm(firstFloorBdrmYesNoComboBox.getSelectedIndex());
            unit.setFirstfloorbath(firstFloorBathroomYesNoComboBox.getSelectedIndex());
            unit.setFamilyroom(familyRoomYesNoComboBox.getSelectedIndex());
            unit.setDiningroom(diningRoomYesNoComboBox.getSelectedIndex());
            unit.setGaragespaces(garageSpacesComboBox.getSelectedIndex());
            unit.setRoomList(saveRooms());
            property.setUnit(currentUnitIndex, unit);
//            unit.setUnitid(property.getUnitListAsList().indexOf(unit));
        }

        /**
         * saves all the room information from the forms to the room object
         * @return an array of the rooms created
         */
        private List<Room> saveRooms() {
            List<Room> roomLists = new ArrayList<Room>();
            int i = 0;
            if (diningRoomCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Dining Room");
                room.setFeatures(Integer.toString(diningRoomCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(DiningRoomLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(DiningRoomWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
//                            i++;
            }
            if (entryRoomCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Entry Room");
                room.setFeatures(Integer.toString(entryRoomCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(entryRoomLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(entryRoomWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
            }
            if (familyRoomCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Family Room");
                room.setFeatures(Integer.toString(familyRoomCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(familyRoomLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(familyRoomWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
            }
            if (kitchenCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Kitchen");
                room.setFeatures(Integer.toString(kitchenCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(kitchenLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(kitchenWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
            }
            if (livingRoomCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Living Room");
                room.setFeatures(Integer.toString(livingRoomCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(livingRoomLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(livingRoomWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
            }
            if (masterBedroomCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Master Bedroom");
                room.setFeatures(Integer.toString(masterBedroomCBConverter.getValue()));
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(masterBedroomLength.getText())));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setWidth(Integer.parseInt(validateNonNull(masterBedroomWidth.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
                roomLists.add(room);
            }
            if (studyCBConverter.getValue() > 0) {
                room = new Room();
                room.setLabel("Study");
                try {
                    room.setFeatures(Integer.toString(studyCBConverter.getValue()));
                } catch (Exception e) {
                    room.setRlength(0);
                }
                try {
                    room.setRlength(Integer.parseInt(validateNonNull(studyLength.getText())));
                } catch (Exception e) {
                    room.setWidth(0);
                }
//                room.setWidth(Integer.parseInt(validateNonNull(studyWidth.getText())));
                roomLists.add(room);
            }
            return roomLists;
        }

        /**
         * sets the Kitchen checkboxes for data loading purposes
         */
        private void setKitchenCheckboxes() {
            woodFloorKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX1));
            ceramicTileKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX2));
            counterBarKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX3));
            countryKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX4));
            firePlaceKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX5));
            eatInKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX6));
            galleyKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX7));
            laminateFloorKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX8));
            vinylFloorKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX9));
            islandKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX10));
            solidSurfaceKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX11));
            vinylFloorKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX12));
            stoneCounterKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX13));
            woodCabinetsKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX14));
            windowTreatKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX15));
            pantryKitchenCkBox.setSelected(kitchenCBConverter.checkOn(kitchenCBConverter.BOX16));
        }

        /**
         * sets the study checkboxes for data loading purposes
         */
        private void setStudyCheckBoxes() {
            woodFloorStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX1));
            bookcaseStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX2));
            closetStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX3));
            wwCarpetStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX4));
            firePlaceStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX5));
            laminateFloorStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX6));
            frenchDoorsStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX7));
            walkoutStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX8));
            windowTreatStudyCkBox.setSelected(studyCBConverter.checkOn(studyCBConverter.BOX9));
        }

        /**
         * sets the living room checkboxes for data loading purposes
         */
        private void setLivingRoomCheckBoxes() {
            woodFloorLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX1));
            wetBarLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX2));
            bookcaseLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX3));
            skylightLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX4));
            wwCarpetLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX5));
            firePlaceLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX6));
            laminateFloorLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX7));
            dryBarLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX8));
            walkoutLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX9));
            windowTreatLivingRoomCkBox.setSelected(livingRoomCBConverter.checkOn(livingRoomCBConverter.BOX10));
        }

        /**
         * sets the Master checkboxes for data loading purposes
         */
        private void setMasterCheckBoxes() {
            woodFloorMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX1));
            skyLightMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX2));
            sittingRoomMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX3));
            wwCarpetMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX4));
            firePlaceMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX5));
            closetMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX6));
            bathAdjoinsMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX7));
            walkoutMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX8));
            windowTreatMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX9));
            vaultedCeilingMasterBedroomCkBox.setSelected(masterBedroomCBConverter.checkOn(masterBedroomCBConverter.BOX10));
        }

        /**
         * sets the Family Room checkboxes for data loading purposes
         */
        private void setFamilyRoomCheckBoxes() {
            woodFloorFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX1));
            skylightFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX2));
            panelWallsFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX3));
            wwCarpetFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX4));
            firePlaceFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX5));
            laminateFloorFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX6));
            dryBarFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX7));
            walkoutFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX8));
            windowTreatFamilyRoomCkBox.setSelected(familyRoomCBConverter.checkOn(familyRoomCBConverter.BOX9));
        }

        /**
         * sets the Dining Room checkboxes for data loading purposes
         */
        private void setDiningRoomCheckBoxes() {
            woodFloorDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX1));
            chandelierDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX2));
            chairRailDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX3));
            wwCarpetDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX4));
            firePlaceDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX5));
            laminateFloorDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX6));
            builtInsDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX8));
            walkoutDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX9));
            windowTreatDiningRoomCkBox.setSelected(diningRoomCBConverter.checkOn(diningRoomCBConverter.BOX10));
        }

        /**
         * sets the Other fields checkboxes for data loading purposes
         */
        private void setOtherFields() {
            try {
                numberOfFireplacesTextField.setText(Integer.toString(unit.getNumberoffireplaces()));
            } catch (NullPointerException npe) {
                numberOfFireplacesTextField.setText("0");
            }
            try {
                numberOfRoomsTextField.setText(Integer.toString(unit.getNumberofrooms()));
            } catch (NullPointerException npe) {
                numberOfRoomsTextField.setText("0");
            }
            try {
                garageSpacesComboBox.setSelectedIndex(unit.getGaragespaces());
            } catch (NullPointerException npe) {
                garageSpacesComboBox.setSelectedIndex(0);
            }
            try {
                heatPaidComboBox.setSelectedIndex(unit.getHeatincluded());
            } catch (NullPointerException npe) {
                heatPaidComboBox.setSelectedIndex(0);
            }
            try {
                waterPaidComboBox.setSelectedIndex(unit.getWaterincluded());
            } catch (NullPointerException npe) {
                waterPaidComboBox.setSelectedIndex(0);
            }
            try {
                separateFurnaceYesNoComboBox.setSelectedIndex(unit.getSeparatefurnace());
            } catch (NullPointerException npe) {
                separateFurnaceYesNoComboBox.setSelectedIndex(0);
            }
            try {
                separateGasYesNoComboBox.setSelectedIndex(unit.getSeparategaselectric());
            } catch (NullPointerException npe) {
                separateGasYesNoComboBox.setSelectedIndex(0);
            }
            try {
                airConditionYesNoComboBox.setSelectedIndex(unit.getSeparateac());
            } catch (NullPointerException npe) {
                airConditionYesNoComboBox.setSelectedIndex(0);
            }
            try {
                disabilityAccessYesNoComboBox.setSelectedIndex(unit.getDisabilityaccess());
            } catch (NullPointerException npe) {
                disabilityAccessYesNoComboBox.setSelectedIndex(0);
            }
            try {
                firstFloorBathroomYesNoComboBox.setSelectedIndex(unit.getFirstfloorbath());
            } catch (NullPointerException npe) {
                firstFloorBathroomYesNoComboBox.setSelectedIndex(0);
            }
            try {
                firstFloorBdrmYesNoComboBox.setSelectedIndex(unit.getFirstfloorbdrm());
            } catch (NullPointerException npe) {
                firstFloorBdrmYesNoComboBox.setSelectedIndex(0);
            }
            try {
                familyRoomYesNoComboBox.setSelectedIndex(unit.getFamilyroom());
            } catch (NullPointerException npe) {
                familyRoomYesNoComboBox.setSelectedIndex(0);
            }
            try {
                diningRoomYesNoComboBox.setSelectedIndex(unit.getDiningroom());
            } catch (NullPointerException npe) {
                diningRoomYesNoComboBox.setSelectedIndex(0);
            }
        }

        /**
         * calling all the other check boxes
         */
        private void setCheckBoxes() {
            setDiningRoomCheckBoxes();
            setLivingRoomCheckBoxes();
            setMasterCheckBoxes();
            setStudyCheckBoxes();
            setDiningRoomCheckBoxes();
            setKitchenCheckboxes();
            setFamilyRoomCheckBoxes();
        }
        private int roomCount = 0;
        private JPanel bottomLeft;
        private JPanel bottomRight;
        private JPanel diningRoomListPanel;
        private JPanel entryListPanel;
        private JPanel familyRoomListPanel;
        private JPanel houseInfoPanel;
        private JPanel kitchenListPanel;
        private JPanel livingRoomListPanel;
        private JPanel masterBedroomListPanel;
        private JPanel roomInfoPanel;
        private JPanel roomPanel;
        private JPanel studyListPanel;
        private JPanel tenantOwnerPanel;
        private JPanel topLeft;
        private JPanel topRight;
//        private Property property;
        private PropertyEntryPanel pep;
//        private Unit unit;
        private CheckBoxConverter diningRoomCBConverter = new CheckBoxConverter(8);
        private CheckBoxConverter entryRoomCBConverter = new CheckBoxConverter(11);
        private CheckBoxConverter familyRoomCBConverter = new CheckBoxConverter(9);
        private CheckBoxConverter kitchenCBConverter = new CheckBoxConverter(15);
        private CheckBoxConverter livingRoomCBConverter = new CheckBoxConverter(10);
        private CheckBoxConverter masterBedroomCBConverter = new CheckBoxConverter(9);
        private CheckBoxConverter studyCBConverter = new CheckBoxConverter(9);
        private DefaultListModel roomList;
        private JCheckBox bathAdjoinsMasterBedroomCkBox;
        private JCheckBox bookcaseEntryCkBox;
        private JCheckBox bookcaseFamilyRoomCkBox;
        private JCheckBox bookcaseLivingRoomCkBox;
        private JCheckBox bookcaseStudyCkBox;
        private JCheckBox breakfastCheckBox;
        private JCheckBox builtInsDiningRoomCkBox;
        private JCheckBox ceramicTileKitchenCkBox;
        private JCheckBox chairRailDiningRoomCkBox;
        private JCheckBox chandelierDiningRoomCkBox;
        private JCheckBox closetEntryCkBox;
        private JCheckBox closetMasterBedroomCkBox;
        private JCheckBox closetStudyCkBox;
        private JCheckBox counterBarKitchenCkBox;
        private JCheckBox countryKitchenCkBox;
        private JCheckBox diningRoomCheckBox;
        private JCheckBox doubleDoorsEntryCkBox;
        private JCheckBox doubleDoorsLivingRoomCkBox;
        private JCheckBox dressAreaMasterBedroomCkBox;
        private JCheckBox dryBarFamilyRoomCkBox;
        private JCheckBox dryBarLivingRoomCkBox;
        private JCheckBox eatInKitchenCkBox;
        private JCheckBox entryCheckBox;
        private JCheckBox familyRoomCheckBox;
        private JCheckBox firePlaceDiningRoomCkBox;
        private JCheckBox firePlaceEntryCkBox;
        private JCheckBox firePlaceFamilyRoomCkBox;
        private JCheckBox firePlaceKitchenCkBox;
        private JCheckBox firePlaceLivingRoomCkBox;
        private JCheckBox firePlaceMasterBedroomCkBox;
        private JCheckBox firePlaceStudyCkBox;
        private JCheckBox foyerEntryCkBox;
        private JCheckBox frenchDoorsDiningRoomCkBox;
        private JCheckBox frenchDoorsEntryCkBox;
        private JCheckBox frenchDoorsFamilyRoomCkBox;
        private JCheckBox frenchDoorsStudyCkBox;
        private JCheckBox galleyKitchenCkBox;
        private JCheckBox gourmetKitchenCkBox;
        private JCheckBox islandKitchenCkBox;
        private JCheckBox kitchenCheckBox;
        private JCheckBox laminateFloorDiningRoomCkBox;
        private JCheckBox laminateFloorEntryCkBox;
        private JCheckBox laminateFloorFamilyRoomCkBox;
        private JCheckBox laminateFloorKitchenCkBox;
        private JCheckBox laminateFloorLivingRoomCkBox;
        private JCheckBox laminateFloorStudyCkBox;
        private JCheckBox laundryRoomCheckBox;
        private JCheckBox livingRoomCheckBox;
        private JCheckBox panelWallsFamilyRoomCkBox;
        private JCheckBox pantryKitchenCkBox;
        private JCheckBox recRoomCheckBox;
        private JCheckBox sittingRoomMasterBedroomCkBox;
        private JCheckBox skylightFamilyRoomCkBox;
        private JCheckBox skylightLivingRoomCkBox;
        private JCheckBox skyLightMasterBedroomCkBox;
        private JCheckBox solidSurfaceKitchenCkBox;
        private JCheckBox stoneCounterKitchenCkBox;
        private JCheckBox studyCheckBox;
        private JCheckBox vaultedCeilingMasterBedroomCkBox;
        private JCheckBox vinylFloorEntryCkBox;
        private JCheckBox vinylFloorKitchenCkBox;
        private JCheckBox walkoutDiningRoomCkBox;
        private JCheckBox walkoutEntryCkBox;
        private JCheckBox walkoutFamilyRoomCkBox;
        private JCheckBox walkoutLivingRoomCkBox;
        private JCheckBox walkoutMasterBedroomCkBox;
        private JCheckBox walkoutStudyCkBox;
        private JCheckBox wetBarLivingRoomCkBox;
        private JCheckBox windowTreatDiningRoomCkBox;
        private JCheckBox windowTreatEntryCkBox;
        private JCheckBox windowTreatFamilyRoomCkBox;
        private JCheckBox windowTreatKitchenCkBox;
        private JCheckBox windowTreatLivingRoomCkBox;
        private JCheckBox windowTreatMasterBedroomCkBox;
        private JCheckBox windowTreatStudyCkBox;
        private JCheckBox woodCabinetsKitchenCkBox;
        private JCheckBox woodFloorDiningRoomCkBox;
        private JCheckBox woodFloorEntryCkBox;
        private JCheckBox woodFloorFamilyRoomCkBox;
        private JCheckBox woodFloorKitchenCkBox;
        private JCheckBox woodFloorLivingRoomCkBox;
        private JCheckBox woodFloorMasterBedroomCkBox;
        private JCheckBox woodFloorStudyCkBox;
        private JCheckBox wwCarpetDiningRoomCkBox;
        private JCheckBox wwCarpetFamilyRoomCkBox;
        private JCheckBox wwCarpetLivingRoomCkBox;
        private JCheckBox wwCarpetMasterBedroomCkBox;
        private JCheckBox wwCarpetStudyCkBox;
        private JComboBox airConditionYesNoComboBox;
        private JComboBox apartmentLevelComboBox;
        private JComboBox bathComboBox;
        private JComboBox bdrmComboBox;
        private JComboBox diningRoomYesNoComboBox;
        private JComboBox disabilityAccessYesNoComboBox;
        private JComboBox familyRoomYesNoComboBox;
        private JComboBox firstFloorBathroomYesNoComboBox;
        private JComboBox firstFloorBdrmYesNoComboBox;
        private JComboBox garageSpacesComboBox;
        private JComboBox heatPaidComboBox;
        private JComboBox separateFurnaceYesNoComboBox;
        private JComboBox separateGasYesNoComboBox;
        private JComboBox waterPaidComboBox;
        private JFormattedTextField listDateTextField;
        private JLabel airConSeparateLabel;
        private JLabel apartmentLevelLabel;
        private JLabel bathLabel;
        private JLabel bdrmLabel;
        private JLabel commentDiningRoomLabel;
        private JLabel commentEntryLabel;
        private JLabel commentFamilyRoomLabel;
        private JLabel commentKitchenLabel;
        private JLabel commentLivingRoomLabel;
        private JLabel commentMasterBedroomLabel;
        private JLabel commentStudyLabel;
        private JLabel disabilityAccessLabel;
        private JLabel garageSpacesLabel;
        private JLabel heatPaidLabel;
        private JLabel listDateLabel;
        private JLabel lotDimensionsLabel;
        private JLabel lotSizeLabel;
        private JLabel numberOfFireplacesLabel;
        private JLabel numberOfRoomsLabel;
        private JLabel ownerNameLabel;
        private JLabel schoolDistrictLabel;
        private JLabel sepFurnaceLabel;
        private JLabel sepGasElectricLabel;
        private JLabel waterPaidLabel;
        private JLabel yearBuiltLabel;
        private JList roomListHolder;
        private JPanel dimOfDiningRoom;
        private JPanel dimOfEntryRoom;
        private JPanel dimOfFamilyRoom;
        private JPanel dimOfKitchen;
        private JPanel dimOfMasterBedroom;
        private JPanel dimOfStudy;
        private JScrollPane listScroller;
        private JTextArea entryCommentTextArea;
        private JTextField DiningRoomLength;
        private JTextField DiningRoomWidth;
        private JTextField entryRoomLength;
        private JTextField entryRoomWidth;
        private JTextField familyRoomLength;
        private JTextField familyRoomWidth;
        private JTextField kitchenLength;
        private JTextField kitchenWidth;
        private JTextField livingRoomLength;
        private JTextField livingRoomWidth;
        private JTextField lotDimensions1Label;
        private JTextField lotDimensions2Label;
        private JTextField lotSizeTextField;
        private JTextField masterBedroomLength;
        private JTextField masterBedroomWidth;
        private JTextField numberOfFireplacesTextField;
        private JTextField numberOfRoomsTextField;
        private JTextField ownerNameTextField;
        private JTextField roomDim1TextField;
        private JTextField roomDim2TextField;
        private JTextField schoolDistrictTextField;
        private JTextField studyLength;
        private JTextField studyWidth;
        private JTextField yearBuiltTextField;
        private PropertyFeaturesPanel pfp;
        private String[] apartmentLevelSelection = {"0", "1", "2", "3"};
        private String[] bathChoices = {"1", "1.5", "2", "2.5", "3", "3.5", "4"};
        private String[] bdrmChoices = {"1", "2", "3", "4", "5"};
        private String[] garageSpacesSelection = {"0", "1", "1.5", "2", "2.5", "3"};
        private String[] ownerTenantSelection = {"Owner", "Tenant"};
        private String[] roomChoicesSelection = {"Entry", "Living Room", "Dining Room", "Kitchen", "Breakfeast Room", "Family Room", "Study", "Recreation Room", "Laundry Room", "Master Bedroom", "Bedroom 2", "Bedroom 3", "Bedroom 4", "Bedroom 5", "Bathes"};
        private String[] yesNoSelection = {"Yes", "No"};
        private TextArea diningRoomCommentTextArea;
        private TextArea familyRoomCommentTextArea;
        private TextArea KitchenCommentTextArea;
        private TextArea livingRoomCommentTextArea;
        private TextArea masterBedroomCommentTextArea;
        private TextArea studyCommentTextArea;
//        public void actionPerformed(ActionEvent e) {
//            throw new UnsupportedOperationException("Not supported yet.");
//        }
    }

    protected class PropertyEntryPanel extends JPanel {

        boolean isOldProperty = false;

        /** Creates new form PropertyPanel */
        public PropertyEntryPanel() {
            initComponents();
//            loadPropertyData();
        }

        private void loadPropertyData() {
            agentRemarksField.setText(property.getAgentremarks());
            cityField.setText(property.getCity());
            countyField.setText(property.getCounty());
            crossStreetField.setText(property.getCrossstreet());
            directionsField.setText(property.getDirections());
            financingRemarksField.setText(property.getFinancingremarks());
            foundationField.setText(property.getFoundation());
            levelsField.setText(property.getLevels());
            marketingRemarksField.setText(property.getMarketingremarks());
            ownerField.setText(property.getOwner());
            petDepositAmountField.setText((property.getPetdepositamount().toString() == null) ? "" : property.getPetdepositamount().toString());
//            petDepositAmountField.setText(property.getPetdeposit().toString());
            petRestrictionsField.setText(property.getPetrestrictions().toString());
            petsAllowedField.setText(property.getPetsallowed().toString());
            roofField.setText(property.getRoof().toString());
            schoolDistrictField.setText(property.getSchooldistrict());
            specialFinancingField.setText(property.getSpecialfinancing().toString());
            stateField.setText(property.getPstate());
            streetDirField.setText(property.getStreetdir().toString());
            streetNameField.setText(property.getStreetname());
            streetNumberField.setText(property.getStreetname());
            streetSuffixField.setText(property.getStreetsuffix());
            subdivisionField.setText(property.getSubdivision());
            taxIDField.setText(property.getTaxid());
            townshipField.setText(property.getTownship());
            typeField.setText(property.getPtype().toString());
            zipCodeField.setText(property.getZoning());
            jtfNumUnits.setText(Integer.toString(property.getUnitArrayLength()));
            jbPicture1.doClick();
            jbPicture2.doClick();
            jbPicture3.doClick();
            jbPicture4.doClick();
            jbPicture5.doClick();
            jbPicture6.doClick();
        }

        private String validateNonNull(String var) {
            String ret;
            ret = (var == null) ? "0" : var;
            ret = (ret == "") ? "0" : ret;
            return ret;
        }

        private double getPetdepositamount() {
            try {
                return Double.parseDouble(validateNonNull(petDepositAmountField.getText()));
            } catch (Exception e) {
                return 0.00;
            }
        }

        private int getStreetNumber() {
            try {
                return Integer.parseInt(validateNonNull(streetNumberField.getText()));
            } catch (Exception e) {
                return 0;
            }
        }

        private int getZipCode() {
            try {
                return Integer.parseInt(validateNonNull(zipCodeField.getText()));
            } catch (Exception e) {
                return 0;
            }
        }

        protected void savePropertyData() {
            //    throw new UnsupportedOperationException("Not yet implemented");
            property.setAgentremarks(agentRemarksField.getText());
            property.setCity(cityField.getText());
            property.setCounty(countyField.getText());
            property.setCrossstreet(crossStreetField.getText());
            property.setDirections(directionsField.getText());
            property.setFinancingremarks(financingRemarksField.getText());
            property.setFoundation(foundationField.getText());
            property.setLevels(levelsField.getText());
            property.setMarketingremarks(marketingRemarksField.getText());
            property.setOwner(ownerField.getText());
            property.setPetdepositamount(getPetdepositamount());
            property.setPetrestrictions(petRestrictionsField.getText());
            property.setPetsallowed(petsAllowedField.getText());
            property.setSchooldistrict(schoolDistrictField.getText());
            property.setShowinginstructions(showingInstructionsField.getText());
            property.setSpecialfinancing(specialFinancingField.getText());
            property.setPstate(stateField.getText());
            property.setStreetdir(streetDirField.getText());
            property.setStreetname(streetNameField.getText());
            property.setStreetnumber(getStreetNumber());
            property.setStreetsuffix(streetSuffixField.getText());
            property.setSubdivision(subdivisionField.getText());
            property.setTaxid(taxIDField.getText());
            property.setTownship(townshipField.getText());
            property.setPtype(typeField.getText());
            property.setZipcode(getZipCode());
            try {
                property.setPicture1(fcPic1.getSelectedFile().toString().replace('\\', '/'));
            } catch (Exception e) {
            }
            try {
                property.setPicture2(fcPic2.getSelectedFile().toString().replace('\\', '/'));
            } catch (Exception e) {
            }
            try {
                property.setPicture3(fcPic3.getSelectedFile().toString().replace('\\', '/'));
            } catch (Exception e) {
            }
            try {
                property.setPicture4(fcPic4.getSelectedFile().toString().replace('\\', '/'));
            } catch (Exception e) {
            }
            try {
                property.setPicture5(fcPic5.getSelectedFile().toString().replace('\\', '/'));
            } catch (Exception e) {
            }
        }

        @SuppressWarnings("unchecked")
        private void initComponents() {
            fcPic1.addChoosableFileFilter(new ImageFilter());
            fcPic2.addChoosableFileFilter(new ImageFilter());
            fcPic3.addChoosableFileFilter(new ImageFilter());
            fcPic4.addChoosableFileFilter(new ImageFilter());
            fcPic5.addChoosableFileFilter(new ImageFilter());
            fcPic6.addChoosableFileFilter(new ImageFilter());

            buttonGroup1 = new javax.swing.ButtonGroup();
            streetNumberLabel = new javax.swing.JLabel();
            streetDirLabel = new javax.swing.JLabel();
            streetNameLabel = new javax.swing.JLabel();
            streetSuffixLabel = new javax.swing.JLabel();
            cityLabel = new javax.swing.JLabel();
            stateLabel = new javax.swing.JLabel();
            zipCodeLabel = new javax.swing.JLabel();
            crossStreetLabel = new javax.swing.JLabel();
            countyLabel = new javax.swing.JLabel();
            taxIDLabel = new javax.swing.JLabel();
            typeLabel = new javax.swing.JLabel();
            showingInstructionsLabel = new javax.swing.JLabel();
            petsAllowedLabel = new javax.swing.JLabel();
            petRestrictionsLabel = new javax.swing.JLabel();
            petDepositAmountLabel = new javax.swing.JLabel();
            schoolDistrictLabel = new javax.swing.JLabel();
            ownerLabel = new javax.swing.JLabel();
            townshipLabel = new javax.swing.JLabel();
            subdivisionLabel = new javax.swing.JLabel();
            marketingRemarksLabel = new javax.swing.JLabel();
            agentRemarksLabel = new javax.swing.JLabel();
            directionsLabel = new javax.swing.JLabel();
            specialFinancingLabel = new javax.swing.JLabel();
            financingRemarksLabel = new javax.swing.JLabel();
            levelsLabel = new javax.swing.JLabel();
            foundationLabel = new javax.swing.JLabel();
            roofLabel = new javax.swing.JLabel();
            streetNumberField = new javax.swing.JTextField();
            streetDirField = new javax.swing.JTextField();
            streetNameField = new javax.swing.JTextField();
            streetSuffixField = new javax.swing.JTextField();
            cityField = new javax.swing.JTextField();
            stateField = new javax.swing.JTextField();
            zipCodeField = new javax.swing.JTextField();
            crossStreetField = new javax.swing.JTextField();
            countyField = new javax.swing.JTextField();
            taxIDField = new javax.swing.JTextField();
            typeField = new javax.swing.JTextField();
            showingInstructionsField = new javax.swing.JTextField();
            petsAllowedField = new javax.swing.JTextField();
            petRestrictionsField = new javax.swing.JTextField();
            petDepositAmountField = new javax.swing.JTextField();
            schoolDistrictField = new javax.swing.JTextField();
            ownerField = new javax.swing.JTextField();
            townshipField = new javax.swing.JTextField();
            subdivisionField = new javax.swing.JTextField();
            marketingRemarksField = new javax.swing.JTextField();
            agentRemarksField = new javax.swing.JTextField();
            directionsField = new javax.swing.JTextField();
            specialFinancingField = new javax.swing.JTextField();
            financingRemarksField = new javax.swing.JTextField();
            levelsField = new javax.swing.JTextField();
            foundationField = new javax.swing.JTextField();
            roofField = new javax.swing.JTextField();
            saveButton = new javax.swing.JButton();
            deleteButton = new javax.swing.JButton();
            newButton = new javax.swing.JButton();
            jSeparator1 = new javax.swing.JSeparator();
            jbPicture1 = new javax.swing.JButton();
            picture1Panel = new javax.swing.JPanel();
            jbPicture2 = new javax.swing.JButton();
            picture2Panel = new javax.swing.JPanel();
            jbPicture3 = new javax.swing.JButton();
            picture3Panel = new javax.swing.JPanel();
            jbPicture4 = new javax.swing.JButton();
            picture4Panel = new javax.swing.JPanel();
            jbPicture5 = new javax.swing.JButton();
            picture5Panel = new javax.swing.JPanel();
            jbPicture6 = new javax.swing.JButton();
            picture6Panel = new javax.swing.JPanel();
            singleFamilyRadio = new javax.swing.JRadioButton();
            multiFamilyRadio = new javax.swing.JRadioButton();
            jLabel1 = new javax.swing.JLabel();
            jtfNumUnits = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            jcbUnitNumbers = new javax.swing.JComboBox();
            jLabel3 = new javax.swing.JLabel();
            jLabel4 = new javax.swing.JLabel();
            jLabel5 = new javax.swing.JLabel();

            setName("Form"); // NOI18N
            setPreferredSize(new java.awt.Dimension(1095, 758));

            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(b_and_b_properties.B_and_B_PropertiesApp.class).getContext().getResourceMap(PropertyEntryPanel.class);
            streetNumberLabel.setText(resourceMap.getString("streetNumberLabel.text")); // NOI18N
            streetNumberLabel.setName("streetNumberLabel"); // NOI18N

            streetDirLabel.setText(resourceMap.getString("streetDirLabel.text")); // NOI18N
            streetDirLabel.setName("streetDirLabel"); // NOI18N

            streetNameLabel.setText(resourceMap.getString("streetNameLabel.text")); // NOI18N
            streetNameLabel.setName("streetNameLabel"); // NOI18N

            streetSuffixLabel.setText(resourceMap.getString("streetSuffixLabel.text")); // NOI18N
            streetSuffixLabel.setName("streetSuffixLabel"); // NOI18N

            cityLabel.setText(resourceMap.getString("cityLabel.text")); // NOI18N
            cityLabel.setName("cityLabel"); // NOI18N

            stateLabel.setText(resourceMap.getString("stateLabel.text")); // NOI18N
            stateLabel.setName("stateLabel"); // NOI18N

            zipCodeLabel.setText(resourceMap.getString("zipCodeLabel.text")); // NOI18N
            zipCodeLabel.setName("zipCodeLabel"); // NOI18N

            crossStreetLabel.setText(resourceMap.getString("crossStreetLabel.text")); // NOI18N
            crossStreetLabel.setName("crossStreetLabel"); // NOI18N

            countyLabel.setText(resourceMap.getString("countyLabel.text")); // NOI18N
            countyLabel.setName("countyLabel"); // NOI18N

            taxIDLabel.setText(resourceMap.getString("taxIDLabel.text")); // NOI18N
            taxIDLabel.setName("taxIDLabel"); // NOI18N

            typeLabel.setText(resourceMap.getString("typeLabel.text")); // NOI18N
            typeLabel.setName("typeLabel"); // NOI18N

            showingInstructionsLabel.setText(resourceMap.getString("showingInstructionsLabel.text")); // NOI18N
            showingInstructionsLabel.setName("showingInstructionsLabel"); // NOI18N

            petsAllowedLabel.setText(resourceMap.getString("petsAllowedLabel.text")); // NOI18N
            petsAllowedLabel.setName("petsAllowedLabel"); // NOI18N

            petRestrictionsLabel.setText(resourceMap.getString("petRestrictionsLabel.text")); // NOI18N
            petRestrictionsLabel.setName("petRestrictionsLabel"); // NOI18N

            petDepositAmountLabel.setText(resourceMap.getString("petDepositAmountLabel.text")); // NOI18N
            petDepositAmountLabel.setName("petDepositAmountLabel"); // NOI18N

            schoolDistrictLabel.setText(resourceMap.getString("schoolDistrictLabel.text")); // NOI18N
            schoolDistrictLabel.setName("schoolDistrictLabel"); // NOI18N

            ownerLabel.setText(resourceMap.getString("ownerLabel.text")); // NOI18N
            ownerLabel.setName("ownerLabel"); // NOI18N

            townshipLabel.setText(resourceMap.getString("townshipLabel.text")); // NOI18N
            townshipLabel.setName("townshipLabel"); // NOI18N

            subdivisionLabel.setText(resourceMap.getString("subdivisionLabel.text")); // NOI18N
            subdivisionLabel.setName("subdivisionLabel"); // NOI18N

            marketingRemarksLabel.setText(resourceMap.getString("marketingRemarksLabel.text")); // NOI18N
            marketingRemarksLabel.setName("marketingRemarksLabel"); // NOI18N

            agentRemarksLabel.setText(resourceMap.getString("agentRemarksLabel.text")); // NOI18N
            agentRemarksLabel.setName("agentRemarksLabel"); // NOI18N

            directionsLabel.setText(resourceMap.getString("directionsLabel.text")); // NOI18N
            directionsLabel.setName("directionsLabel"); // NOI18N

            specialFinancingLabel.setText(resourceMap.getString("specialFinancingLabel.text")); // NOI18N
            specialFinancingLabel.setName("specialFinancingLabel"); // NOI18N

            financingRemarksLabel.setText(resourceMap.getString("financingRemarksLabel.text")); // NOI18N
            financingRemarksLabel.setName("financingRemarksLabel"); // NOI18N

            levelsLabel.setText(resourceMap.getString("levelsLabel.text")); // NOI18N
            levelsLabel.setName("levelsLabel"); // NOI18N

            foundationLabel.setText(resourceMap.getString("foundationLabel.text")); // NOI18N
            foundationLabel.setName("foundationLabel"); // NOI18N

            roofLabel.setText(resourceMap.getString("roofLabel.text")); // NOI18N
            roofLabel.setName("roofLabel"); // NOI18N

            streetNumberField.setName("streetNumberField"); // NOI18N

            streetDirField.setName("streetDirField"); // NOI18N

            streetNameField.setName("streetNameField"); // NOI18N

            streetSuffixField.setName("streetSuffixField"); // NOI18N

            cityField.setName("cityField"); // NOI18N

            stateField.setName("stateField"); // NOI18N

            zipCodeField.setName("zipCodeField"); // NOI18N

            crossStreetField.setName("crossStreetField"); // NOI18N

            countyField.setName("countyField"); // NOI18N

            taxIDField.setName("taxIDField"); // NOI18N

            typeField.setName("typeField"); // NOI18N

            showingInstructionsField.setText(resourceMap.getString("showingInstructionsField.text")); // NOI18N
            showingInstructionsField.setName("showingInstructionsField"); // NOI18N

            petsAllowedField.setName("petsAllowedField"); // NOI18N

            petRestrictionsField.setName("petRestrictionsField"); // NOI18N

            petDepositAmountField.setName("petDepositAmountField"); // NOI18N

            schoolDistrictField.setName("schoolDistrictField"); // NOI18N

            ownerField.setName("ownerField"); // NOI18N

            townshipField.setName("townshipField"); // NOI18N

            subdivisionField.setName("subdivisionField"); // NOI18N

            marketingRemarksField.setName("marketingRemarksField"); // NOI18N

            agentRemarksField.setName("agentRemarksField"); // NOI18N

            directionsField.setName("directionsField"); // NOI18N

            specialFinancingField.setName("specialFinancingField"); // NOI18N

            financingRemarksField.setName("financingRemarksField"); // NOI18N

            levelsField.setName("levelsField"); // NOI18N

            foundationField.setName("foundationField"); // NOI18N

            roofField.setName("roofField"); // NOI18N

            saveButton.setText(resourceMap.getString("saveButton.text")); // NOI18N
            saveButton.setName("saveButton"); // NOI18N
            saveButton.setPreferredSize(new java.awt.Dimension(75, 25));
            saveButton.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    saveButtonActionPerformed(evt);
                }
            });

            deleteButton.setText(resourceMap.getString("deleteButton.text")); // NOI18N
            deleteButton.setName("deleteButton"); // NOI18N
            deleteButton.setPreferredSize(new java.awt.Dimension(75, 25));

            newButton.setText(resourceMap.getString("newButton.text")); // NOI18N
            newButton.setName("newButton"); // NOI18N
            newButton.setPreferredSize(new java.awt.Dimension(75, 25));

            jSeparator1.setName("jSeparator1"); // NOI18N

            javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(b_and_b_properties.B_and_B_PropertiesApp.class).getContext().getActionMap(PropertyEntryPanel.class, this);
            jbPicture1.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture1.setText(resourceMap.getString("jbPicture1.text")); // NOI18N
            jbPicture1.setName("jbPicture1"); // NOI18N
            jbPicture1.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture1ActionPerformed(evt);
                }
            });

            picture1Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture1Panel.setName("picture1Panel"); // NOI18N

            javax.swing.GroupLayout picture1PanelLayout = new javax.swing.GroupLayout(picture1Panel);
            picture1Panel.setLayout(picture1PanelLayout);
            picture1PanelLayout.setHorizontalGroup(
                    picture1PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture1PanelLayout.setVerticalGroup(
                    picture1PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            jbPicture2.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture2.setText(resourceMap.getString("jbPicture2.text")); // NOI18N
            jbPicture2.setName("jbPicture2"); // NOI18N
            jbPicture2.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture2ActionPerformed(evt);
                }
            });

            picture2Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture2Panel.setName("picture2Panel"); // NOI18N

            javax.swing.GroupLayout picture2PanelLayout = new javax.swing.GroupLayout(picture2Panel);
            picture2Panel.setLayout(picture2PanelLayout);
            picture2PanelLayout.setHorizontalGroup(
                    picture2PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture2PanelLayout.setVerticalGroup(
                    picture2PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            jbPicture3.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture3.setText(resourceMap.getString("jbPicture3.text")); // NOI18N
            jbPicture3.setName("jbPicture3"); // NOI18N
            jbPicture3.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture3ActionPerformed(evt);
                }
            });

            picture3Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture3Panel.setName("picture3Panel"); // NOI18N

            javax.swing.GroupLayout picture3PanelLayout = new javax.swing.GroupLayout(picture3Panel);
            picture3Panel.setLayout(picture3PanelLayout);
            picture3PanelLayout.setHorizontalGroup(
                    picture3PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture3PanelLayout.setVerticalGroup(
                    picture3PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            jbPicture4.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture4.setText(resourceMap.getString("jbPicture4.text")); // NOI18N
            jbPicture4.setName("jbPicture4"); // NOI18N
            jbPicture4.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture4ActionPerformed(evt);
                }
            });

            picture4Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture4Panel.setName("picture4Panel"); // NOI18N

            javax.swing.GroupLayout picture4PanelLayout = new javax.swing.GroupLayout(picture4Panel);
            picture4Panel.setLayout(picture4PanelLayout);
            picture4PanelLayout.setHorizontalGroup(
                    picture4PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture4PanelLayout.setVerticalGroup(
                    picture4PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            jbPicture5.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture5.setText(resourceMap.getString("jbPicture5.text")); // NOI18N
            jbPicture5.setName("jbPicture5"); // NOI18N
            jbPicture5.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture5ActionPerformed(evt);
                }
            });

            picture5Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture5Panel.setName("picture5Panel"); // NOI18N

            javax.swing.GroupLayout picture5PanelLayout = new javax.swing.GroupLayout(picture5Panel);
            picture5Panel.setLayout(picture5PanelLayout);
            picture5PanelLayout.setHorizontalGroup(
                    picture5PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture5PanelLayout.setVerticalGroup(
                    picture5PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            jbPicture6.setAction(actionMap.get("picture1Button")); // NOI18N
            jbPicture6.setText(resourceMap.getString("jbPicture6.text")); // NOI18N
            jbPicture6.setName("jbPicture6"); // NOI18N
            jbPicture6.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbPicture6ActionPerformed(evt);
                }
            });

            picture6Panel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
            picture6Panel.setName("picture6Panel"); // NOI18N

            javax.swing.GroupLayout picture6PanelLayout = new javax.swing.GroupLayout(picture6Panel);
            picture6Panel.setLayout(picture6PanelLayout);
            picture6PanelLayout.setHorizontalGroup(
                    picture6PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 337, Short.MAX_VALUE));
            picture6PanelLayout.setVerticalGroup(
                    picture6PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 164, Short.MAX_VALUE));

            buttonGroup1.add(singleFamilyRadio);
            singleFamilyRadio.setText(resourceMap.getString("singleFamilyRadio.text")); // NOI18N
            singleFamilyRadio.setName("singleFamilyRadio"); // NOI18N
            singleFamilyRadio.addItemListener(new java.awt.event.ItemListener() {

                public void itemStateChanged(java.awt.event.ItemEvent evt) {
                    singleFamilyRadioItemStateChanged(evt);
                }
            });

            buttonGroup1.add(multiFamilyRadio);
            multiFamilyRadio.setName("multiFamilyRadio"); // NOI18N
            multiFamilyRadio.addItemListener(new java.awt.event.ItemListener() {

                public void itemStateChanged(java.awt.event.ItemEvent evt) {
                    multiFamilyRadioItemStateChanged(evt);
                }
            });

            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
            jLabel1.setName("jLabel1"); // NOI18N

            jtfNumUnits.setColumns(2);
            jtfNumUnits.setName("jtfNumUnits"); // NOI18N
            jtfNumUnits.addFocusListener(new java.awt.event.FocusAdapter() {

                public void focusLost(java.awt.event.FocusEvent evt) {
                    jtfNumUnitsFocusLost(evt);
                }
            });

            jLabel2.setName("jLabel2"); // NOI18N

            jcbUnitNumbers.setMaximumRowCount(10);
            jcbUnitNumbers.setName("unitComboBox"); // NOI18N
            jcbUnitNumbers.addActionListener(new java.awt.event.ActionListener() {

                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcbUnitNumbersActionPerformed(evt);
                }
            });

            jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
            jLabel3.setName("jLabel3"); // NOI18N

            jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
            jLabel4.setName("jLabel4"); // NOI18N

            jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
            jLabel5.setName("jLabel5"); // NOI18N

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 1023, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(singleFamilyRadio)
                    .addComponent(multiFamilyRadio))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jcbUnitNumbers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup().addComponent(jLabel4).addGap(18, 18, 18)
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jtfNumUnits, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 264, Short.MAX_VALUE)
                    .addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(saveButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(2176, 2176, 2176)).addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel2).addContainerGap(1064, Short.MAX_VALUE)))).addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbPicture4)
                    .addComponent(picture4Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(10, 10, 10).
                    addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jbPicture5)
                    .addComponent(picture5Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(10, 10, 10).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jbPicture6)
                    .addComponent(picture6Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addContainerGap(48, Short.MAX_VALUE)).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jbPicture1)
                    .addComponent(picture1Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbPicture2)
                    .addComponent(picture2Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(8, 8, 8).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jbPicture3)
                    .addComponent(picture3Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(townshipLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(townshipField, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(subdivisionLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(subdivisionField, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(roofLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(roofField, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(foundationLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(foundationField, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18)
                    .addComponent(levelsLabel)).addGroup(layout.createSequentialGroup().addComponent(typeLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(typeField, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(petsAllowedLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(petsAllowedField, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(petRestrictionsLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(petRestrictionsField, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18).addComponent(petDepositAmountLabel))).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(petDepositAmountField, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .addComponent(levelsField, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE))).addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGap(9, 9, 9).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(schoolDistrictLabel)
                    .addComponent(marketingRemarksLabel).addComponent(agentRemarksLabel).addComponent(directionsLabel).addComponent(specialFinancingLabel)).addGap(4, 4, 4).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup()
                    .addComponent(specialFinancingField, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18).addComponent(financingRemarksLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(financingRemarksField, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE)).addComponent(schoolDistrictField, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE)
                    .addComponent(marketingRemarksField, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE).addComponent(agentRemarksField, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE).addComponent(directionsField, javax.swing.GroupLayout.DEFAULT_SIZE, 834, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addGroup(layout.createSequentialGroup().addComponent(cityLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(cityField, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup(layout.createSequentialGroup()
                    .addComponent(streetNumberLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(streetNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(stateLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(stateField, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup(layout.createSequentialGroup().addComponent(streetDirLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(streetDirField, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(zipCodeLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(zipCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(countyLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(countyField, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup(layout.createSequentialGroup().addGap(296, 296, 296).addComponent(taxIDLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(taxIDField, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(ownerLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(ownerField, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addComponent(streetNameLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(streetNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18)
                    .addComponent(streetSuffixLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(streetSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18)
                    .addComponent(crossStreetLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(crossStreetField, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)))).addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                    .addComponent(showingInstructionsLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(showingInstructionsField, javax.swing.GroupLayout.PREFERRED_SIZE, 834, javax.swing.GroupLayout.PREFERRED_SIZE))).addGap(93, 93, 93))).addGap(1892, 1892, 1892)))));
            layout.setVerticalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup()
                    .addGap(11, 11, 11)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(singleFamilyRadio).addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(saveButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(multiFamilyRadio).addComponent(jLabel2)).addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel5).addGap(1, 1, 1)))).addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
                    .addComponent(jtfNumUnits, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jcbUnitNumbers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)))).addGap(5, 5, 5).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(streetNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(streetNumberLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(cityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cityLabel))).addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(streetDirField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(streetNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(streetDirLabel)
                    .addComponent(streetNameLabel).addComponent(crossStreetLabel).addComponent(streetSuffixLabel)
                    .addComponent(streetSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(crossStreetField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(zipCodeLabel).addComponent(zipCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(countyLabel)
                    .addComponent(countyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(stateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(stateLabel)
                    .addComponent(taxIDLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(taxIDField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(ownerLabel)
                    .addComponent(ownerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(townshipLabel)
                    .addComponent(townshipField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(subdivisionLabel)
                    .addComponent(subdivisionField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(roofLabel).addComponent(roofField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(foundationLabel)
                    .addComponent(foundationField, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(levelsLabel).addComponent(levelsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(16, 16, 16)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(typeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(typeLabel).addComponent(petDepositAmountField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(petDepositAmountLabel).addComponent(petRestrictionsLabel).addComponent(petRestrictionsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(petsAllowedField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(petsAllowedLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(showingInstructionsField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(showingInstructionsLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(schoolDistrictField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(schoolDistrictLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(marketingRemarksLabel).addComponent(marketingRemarksField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(agentRemarksLabel).addComponent(agentRemarksField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(directionsLabel)
                    .addComponent(directionsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(7, 7, 7).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(specialFinancingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(financingRemarksLabel)
                    .addComponent(financingRemarksField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(specialFinancingLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addGroup(layout.createSequentialGroup().addComponent(jbPicture1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(picture1Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGroup(layout.createSequentialGroup()
                    .addComponent(jbPicture3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(picture3Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                    .addComponent(jbPicture2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(picture2Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))).addGap(17, 17, 17)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jbPicture4, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jbPicture5, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbPicture6, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(picture4Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(picture5Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(picture6Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))));
        }

        private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
            savePropertyData();
            pdp.saveFunction();
            dao.saveProperty(property);
        }

        private void jbPicture1ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic1.showOpenDialog(this);
            picture1Panel.setLayout(new BorderLayout());
            picture1Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic1.getSelectedFile().toString().replace('\\', '/'));
            picture1Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture1Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void jbPicture2ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic2.showOpenDialog(this);
            picture2Panel.setLayout(new BorderLayout());
            picture2Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic2.getSelectedFile().toString().replace('\\', '/'));
            picture2Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture2Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void jbPicture3ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic3.showOpenDialog(this);
            picture3Panel.setLayout(new BorderLayout());
            picture3Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic3.getSelectedFile().toString().replace('\\', '/'));
            picture3Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture3Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void jbPicture4ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic4.showOpenDialog(this);
            picture4Panel.setLayout(new BorderLayout());
            picture4Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic4.getSelectedFile().toString().replace('\\', '/'));
            picture4Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture4Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void jbPicture5ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic5.showOpenDialog(this);
            picture5Panel.setLayout(new BorderLayout());
            picture5Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic5.getSelectedFile().toString().replace('\\', '/'));
            picture5Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture5Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void jtfNumUnitsFocusLost(java.awt.event.FocusEvent evt) {
            if (!isOldProperty) {
                int numUnits = Integer.parseInt(validateNonNull(jtfNumUnits.getText()));
                System.out.println("numUnits=" + numUnits);
                if (numUnits > 0) {
                    property.newUnitArray(numUnits);
                    String[] string = new String[numUnits];
                    for (int i = 0; i < numUnits; i++) {
                        string[i] = Integer.toString(i + 1);
                    }
                    jcbUnitNumbers.setModel(new javax.swing.DefaultComboBoxModel(string));
                    pdp.setUnit(0, isOldProperty);
                }
            } else {
            }
            jcbUnitNumbers.validate();
        }

        private void jcbUnitNumbersActionPerformed(java.awt.event.ActionEvent evt) {
            int i = Integer.parseInt((String) ((JComboBox) evt.getSource()).getSelectedItem());
            pdp.setUnit(i - 1, isOldProperty);
        }

        private void jbPicture6ActionPerformed(java.awt.event.ActionEvent evt) {
            fcPic6.showOpenDialog(this);
            picture6Panel.setLayout(new BorderLayout());
            picture6Panel.setPreferredSize(new Dimension(339, 166));
            ImageIcon file = new ImageIcon(fcPic6.getSelectedFile().toString().replace('\\', '/'));
            picture6Panel.add(new JLabel(file), BorderLayout.CENTER);
            picture6Panel.setVisible(true);
            this.repaint();
            this.revalidate();
        }

        private void singleFamilyRadioItemStateChanged(java.awt.event.ItemEvent evt) {
            multiFamilyRadio.setEnabled(false);
            jtfNumUnits.setEnabled(false);
            jcbUnitNumbers.addItem("1");
            jcbUnitNumbers.setSelectedIndex(0);
            jcbUnitNumbers.setEnabled(false);
        }

        private void multiFamilyRadioItemStateChanged(java.awt.event.ItemEvent evt) {
            singleFamilyRadio.setEnabled(false);
        }

        private void jRadioButton2StateChanged(javax.swing.event.ChangeEvent evt) {
            singleFamilyRadio.setEnabled(false);
            jtfNumUnits.setEnabled(true);
        }
        private JFileChooser fcPic1 = new JFileChooser();
        private JFileChooser fcPic2 = new JFileChooser();
        private JFileChooser fcPic3 = new JFileChooser();
        private JFileChooser fcPic4 = new JFileChooser();
        private JFileChooser fcPic5 = new JFileChooser();
        private JFileChooser fcPic6 = new JFileChooser();
        private Image returnPic1;
        private Image returnPic2;
        private Image returnPic3;
        private Image returnPic4;
        private Image returnPic5;
        private Image returnPic6;
        private int unitSelected;
        // Variables declaration - do not modify
        private javax.swing.JTextField agentRemarksField;
        private javax.swing.JLabel agentRemarksLabel;
        private javax.swing.ButtonGroup buttonGroup1;
        private javax.swing.JTextField cityField;
        private javax.swing.JLabel cityLabel;
        private javax.swing.JTextField countyField;
        private javax.swing.JLabel countyLabel;
        private javax.swing.JTextField crossStreetField;
        private javax.swing.JLabel crossStreetLabel;
        private javax.swing.JButton deleteButton;
        private javax.swing.JTextField directionsField;
        private javax.swing.JLabel directionsLabel;
        private javax.swing.JTextField financingRemarksField;
        private javax.swing.JLabel financingRemarksLabel;
        private javax.swing.JTextField foundationField;
        private javax.swing.JLabel foundationLabel;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JSeparator jSeparator1;
        private javax.swing.JButton jbPicture1;
        private javax.swing.JButton jbPicture2;
        private javax.swing.JButton jbPicture3;
        private javax.swing.JButton jbPicture4;
        private javax.swing.JButton jbPicture5;
        private javax.swing.JButton jbPicture6;
        private javax.swing.JComboBox jcbUnitNumbers;
        private javax.swing.JTextField jtfNumUnits;
        private javax.swing.JTextField levelsField;
        private javax.swing.JLabel levelsLabel;
        private javax.swing.JTextField marketingRemarksField;
        private javax.swing.JLabel marketingRemarksLabel;
        private javax.swing.JRadioButton multiFamilyRadio;
        private javax.swing.JButton newButton;
        private javax.swing.JTextField ownerField;
        private javax.swing.JLabel ownerLabel;
        private javax.swing.JTextField petDepositAmountField;
        private javax.swing.JLabel petDepositAmountLabel;
        private javax.swing.JTextField petRestrictionsField;
        private javax.swing.JLabel petRestrictionsLabel;
        private javax.swing.JTextField petsAllowedField;
        private javax.swing.JLabel petsAllowedLabel;
        private javax.swing.JPanel picture1Panel;
        private javax.swing.JPanel picture2Panel;
        private javax.swing.JPanel picture3Panel;
        private javax.swing.JPanel picture4Panel;
        private javax.swing.JPanel picture5Panel;
        private javax.swing.JPanel picture6Panel;
        private javax.swing.JTextField roofField;
        private javax.swing.JLabel roofLabel;
        private javax.swing.JButton saveButton;
        private javax.swing.JTextField schoolDistrictField;
        private javax.swing.JLabel schoolDistrictLabel;
        private javax.swing.JTextField showingInstructionsField;
        private javax.swing.JLabel showingInstructionsLabel;
        private javax.swing.JRadioButton singleFamilyRadio;
        private javax.swing.JTextField specialFinancingField;
        private javax.swing.JLabel specialFinancingLabel;
        private javax.swing.JTextField stateField;
        private javax.swing.JLabel stateLabel;
        private javax.swing.JTextField streetDirField;
        private javax.swing.JLabel streetDirLabel;
        private javax.swing.JTextField streetNameField;
        private javax.swing.JLabel streetNameLabel;
        private javax.swing.JTextField streetNumberField;
        private javax.swing.JLabel streetNumberLabel;
        private javax.swing.JTextField streetSuffixField;
        private javax.swing.JLabel streetSuffixLabel;
        private javax.swing.JTextField subdivisionField;
        private javax.swing.JLabel subdivisionLabel;
        private javax.swing.JTextField taxIDField;
        private javax.swing.JLabel taxIDLabel;
        private javax.swing.JTextField townshipField;
        private javax.swing.JLabel townshipLabel;
        private javax.swing.JTextField typeField;
        private javax.swing.JLabel typeLabel;
        private javax.swing.JTextField zipCodeField;
        private javax.swing.JLabel zipCodeLabel;
    }
}
